package com.hsy.crm.web.web.stone;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.TransferOrder;
import com.hsy.crm.web.domain.vo.transfer.TransferVo;
import com.hsy.crm.web.domain.vo.transferOrder.TransferOrderPageVo;
import com.hsy.crm.web.service.impl.TransferOrderService;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/transfer")
public class TransferOrderAction extends BaseAction {

    @Autowired
    TransferOrderService transferOrderService;

    @RequestMapping("/insert")
    public String insert(TransferVo transferVo) {
        return Response.body(transferOrderService.insertTransferOrder(transferVo));
    }

    @RequestMapping("/update")
    public String update(TransferVo transferVo) {
        return Response.body(transferOrderService.updateTransferOrder(transferVo));
    }

    @RequestMapping("/delete")
    public String delete(TransferOrder transferOrder) {
        return Response.body(transferOrderService.deleteTransferOrder(transferOrder));
    }

   /* @RequestMapping("/examine")
    public String examine(TransferOrder order) {
        return Response.body(transferOrderService.examine(order));
    }*/

    @RequestMapping("/invalid")
    public String invalid(TransferOrder order) {
        return Response.body(transferOrderService.doInvalid(order));
    }

    @RequestMapping("/getOrder")
    public String get(TransferOrder order) {
        return Response.body(transferOrderService.getOrder(order));
    }

    @RequestMapping("/page")
    public String page(TransferOrderPageVo transferOrderPageVo) {
        return Response.body(transferOrderService.page(transferOrderPageVo));
    }

}
